Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Camera Placement

Labels

ASCII
CameraPlacement
Binary
cmpl ( = 0x636D706C )

Data Format

Point3D             location
Point3D             pointOfInterest
Vector3D            upVector
location
The location (in world-space coordinates) of the eye point of the parent camera.
pointOfInterest
The point at which the parent camera is aimed, in world-space coordinates.
upVector
The up-vector of the parent camera. This vector should be perpendicular to the viewing direction defined by the values in the location and pointOfInterest fields. This vector should be normalized.

Data Size

36

Description

A camera placement object defines the location, point of interest, and orientation of its parent camera, in world-space coordinates. The camera vector (also called the view vector) is defined to be the vector pointOfInterest - location . This vector is normal to the projection plane and to the clipping planes, and the distances from the camera to those planes are measured along this vector.

A camera placement object determines the coordinate system of the projection plane as follows. The origin of the projection plane is the point at the intersection of the projection plane and the line through the location and point of interest. The y axis of the projection plane coincides with the projection onto the projection plane of the up vector, and the x axis of the projection plane is the axis such that it, the y axis of the projection plane, and the inverse of the camera vector form a righthanded coordinate system.

If no camera placement object is specified for a camera, that camera should receive the default camera placement values specified below.

Parent Hierarchy

Data.

Parent Objects

View angle aspect camera, view plane camera, orthographic camera. A camera placement object always has a camera as a parent object.

Child Objects

None.

Example

Container (
    ViewAngleAspectCamera ( ... )
    CameraPlacement (
        0 0 30                      # location on z axis
        0 0 0                       # point of interest is the origin
        0 1 0                       # up vector aligned with yaxis
    )
)

Default Values

0 0 1           # location
0 0 0           # pointOfInterest
0 1 0           # upVector

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |